<template>
    <div>
        <select v-model="type">
            <option :value="1">App订票</option>
            <option :value="0">前台兑换</option>
        </select>
        <ul>
            <li v-for="item in store.getters['CinemaModule/computedCinemaList'](type)" :key="item.cinemaId">
                {{ item.name }}
            </li>
        </ul>
    </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { useStore } from 'vuex';

const type = ref(1)

const store = useStore()

onMounted(() => {
    if (store.state.CinemaModule.cinemaList.length === 0) { //升级
        //请求数据
        store.dispatch("CinemaModule/getCinemaList", "参数演示")
        // this.getCinemaList("参数演示~")//升级
    } else {
        console.log("走缓存-vca");
    }
})

</script>

<style scoped>
ul li {
    padding: 10px;

}
</style>